package com.itheima.mp.enumConfig;

import lombok.Getter;

@Getter
public enum statusEnum {
     zhongyong(1,"正常"),
     fengzhuang(2,"冻结");

    private Integer code;
    private String message;
    statusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public  static String getMessage(Integer code){
        for (statusEnum value : statusEnum.values()) {
            if(value.getCode().equals(code)){
                return value.getMessage();
            }
        }
        return "";
    }

}
